
package com.tt.entity;

import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name="user")
public class User {

	private Integer id;
	private String username;
	private String password;
	private String email;
	private int status;
	private String img;
	private String shopname;
	private String address;
	private Set<Strategy> strategys;
	private Set<Hotel> hotels;
	private Set<Food> foods;
	private Set<Question> questions;
	private Set<Reply> replys;
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name="shopname")
	public String getShopname() {
		return shopname;
	}
	public void setShopname(String shopname) {
		this.shopname = shopname;
	}
	@Column(name="address")
	public String getAddress() {
		return address;
	}
	public void setAddress(String address) {
		this.address = address;
	}
	@Column(name="img")
	public String getImg() {
		return img;
	}
	public void setImg(String img) {
		this.img = img;
	}
	@Column(name="username")
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	@Column(name="password")
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	@Column(name="email")
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	@Column(name="status")
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
	@OneToMany(targetEntity=Strategy.class,mappedBy="user",cascade=CascadeType.ALL)
	public Set<Strategy> getStrategys() {
		return strategys;
	}
	public void setStrategys(Set<Strategy> strategys) {
		this.strategys = strategys;
	}
	@OneToMany(targetEntity=Hotel.class,mappedBy="user",cascade=CascadeType.ALL)
	public Set<Hotel> getHotels() {
		return hotels;
	}
	public void setHotels(Set<Hotel> hotels) {
		this.hotels = hotels;
	}
	@OneToMany(targetEntity=Food.class,mappedBy="user",cascade=CascadeType.ALL)
	public Set<Food> getFoods() {
		return foods;
	}
	public void setFoods(Set<Food> foods) {
		this.foods = foods;
	}
	@OneToMany(targetEntity=Question.class,mappedBy="user",cascade=CascadeType.ALL)
	public Set<Question> getQuestions() {
		return questions;
	}
	public void setQuestions(Set<Question> questions) {
		this.questions = questions;
	}
	@OneToMany(targetEntity=Reply.class,mappedBy="user",cascade=CascadeType.ALL)
	public Set<Reply> getReplys() {
		return replys;
	}
	public void setReplys(Set<Reply> replys) {
		this.replys = replys;
	}
	
}
